﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WPF基础.控件
{
    /// <summary>
    /// A19_DataGrid.xaml 的交互逻辑
    /// </summary>
    public partial class A19_DataGrid : Window
    {
        public A19_DataGrid()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            List<A19_UserInfo> list = new List<A19_UserInfo>();
            list.Add(new A19_UserInfo() { Name = "张三", Age = 29, Info = 1 });
            list.Add(new A19_UserInfo() { Name = "张四", Age = 31, Info = 2 });
            list.Add(new A19_UserInfo() { Name = "王五", Age = 39, Info = 3 });
            list.Add(new A19_UserInfo() { Name = "李六", Age = 49, Info = 4 });


			this.DataGrid_1.DataContext = list;
        }


    }
}
